//
//  YLYCalculatorView.h
//  hohoho
//
//  Created by 楊盧银Mac on 14-4-26.
//  Copyright (c) 2014年 com.yly16. All rights reserved.
//

#import <UIKit/UIKit.h>
typedef enum
{
	operatorTypePlus=0,
	operatorTypeMinus=1,
	operatorTypeMul=2,
	operatorTypeDiv=3,
	operatorNoType=4
} OperatorType;

@protocol YLYCalculatorViewDelegate <NSObject>
-(void)showCalculator:(NSString*)calculatorStr;
-(void)quitCalculator;
@end

@interface YLYCalculatorView : UIView
{
    BOOL isOper;
	BOOL isDotDown;
	BOOL isOverFlow;
	BOOL isCal;
	BOOL isPreOper;
	NSString *currentTxt;
	BOOL isExp;//是否出现一次计算的异常
	BOOL flag;//周转变量
	int currentafterNumber;
	int afterDotNumber;
	double num1;
	double num2;
	double currentNumber;
	int numberCount;
	OperatorType currentOperatorType;
}

@property(assign,nonatomic)id<YLYCalculatorViewDelegate>delegate;
@property(retain,nonatomic)UIButton *button;
@property(retain,nonatomic)UILabel *showNumberLabel;

@end
